package com.projectxxxxxxxxxx.animator;

import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;

import com.projectxxxxxxxxxx.Constants;
import com.projectxxxxxxxxxx.R;
import com.projectxxxxxxxxxx.screens.HardwareScreen.LabelParams;
import com.projectxxxxxxxxxx.utils.ScheduledTask;

public abstract class Animator {
    protected final RemoteViews views;
    protected final Context context;
    public static int animatorStep = 0;
    protected ScheduledTask pingTimer;

    protected final int[] screenIds = {
            R.id.layout_screen_hardware,
            R.id.layout_screen_network,
            R.id.layout_screen_toogle
    };

    public Animator(final Context context, final RemoteViews views) {
        this.context = context;
        this.views = views;
        pingTimer = new ScheduledTask.DefaultScheduledTask();
        final Intent intent = new Intent(Constants.ACTION_ANIMATE);
        context.sendBroadcast(intent);
    }

    abstract public void animate(final RemoteViews views, final LabelParams label);

    public void requestRedraw(final String action) {
        final Intent intent = new Intent(action);
        context.sendBroadcast(intent);
    }

}
